<template>
  <div>
    <el-col :span="3">
      <el-button type="primary" @click="addDialogVisiable=true">添加用户</el-button>
    </el-col>
    <el-dialog title="添加用户" :visible.sync="addDialogVisiable" width="50%" @close="closeDialog()">
      <!--内容主体-->
      <addUser ref="addUserRef" :level="'2'" @addUserOk="addUserOk"></addUser>
      <!--按钮-->
    </el-dialog>
  </div>
</template>
<script>
import addUser from '../../index/register.vue'
export default {
  data() {
    return {
      addDialogVisiable: false,
      dataList: []
    }
  },
  methods: {
    // 添加成功后续
    addUserOk() {
      this.$router.go(0)
    },
    closeDialog() {
      this.$refs.addUserRef.reset()
    }
  },
  components: {
    addUser
  }
}
</script>
<style lang="less" scoped>
</style>
